// TOWN SCRIPT
//    Town 20: Tangramayne (after winning)

// This is the special encounter script for this town.
// The states INIT_STATE, EXIT_STATE, and START_STATE have
// meanings that are described in the documentation. States you write
// yourself should be numbered from 10-100.

// flags:
// 20, 0 = entry message flag

begintownscript;

variables;

short choice;

body;

beginstate INIT_STATE;
	turn_off_training(TRUE);
	set_crime_tolerance(5);

	set_name(6, "Charlie");
	set_char_dialogue_pic(6, 549, 0);
	set_name(7, "Lucy");
	set_char_dialogue_pic(7, 547, 0);
	set_name(8, "Elyssa");
	set_char_dialogue_pic(8, 545, 0);
	set_name(9, "Nivius");
	set_char_dialogue_pic(9, 544, 0);
	set_name(10, "Scabban");
	set_char_dialogue_pic(10, 548, 0);
	set_name(11, "Kira");
	set_char_dialogue_pic(11, 546, 0);
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (get_flag(20, 0) == FALSE) {
		set_flag(20, 0, TRUE);
		reset_dialog();
		add_dialog_str(0, "The town of Tangramayne is more vibrant and alive now that the invasion has been stopped.", 0);
		add_dialog_str(1, "The mine is back in operation, the farming has picked up, all is good.", 0);
		add_dialog_str(2, "Even other citizens will be returning as soon as they can to pick up where they left off.", 0);
		add_dialog_choice(0, "Ok");
		choice = run_dialog(TRUE);
	}

	if (get_ran(1, 0, 100) < 11) {
		if (get_ran(1, 0, 100) < 50) {
			text_bubble_on_char(20, "Meow");
		}
		else {
			text_bubble_on_char(20, "Purrrrr");
		}
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(21, "Baaaaa");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(22, "Bleeet");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(23, "Baa Baa");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(24, "Moooo");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(25, "Moo Moo");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(26, "Mooooooo");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(27, "Scrunch Scrunch");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(28, "Cluck Cluck");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(29, "Squawk!");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(30, "Peck Peck");
	}
break;

beginstate 10;
break;
